<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8" />
<title>图片不间断轮显</title>
<style type="text/css">
#asd { width:150px; height:99px;background-image:url("http://img5.nipic.com/2008-12-29/2008122995957609_1.jpg");}
</style>
<script type="text/javascript">
var but =["http://img1.nipic.com/2007-12-03/20071231357626_1.jpg","http://img5.nipic.com/2008-12-10/20081210153613409_1.jpg","http://img2.nipic.com/2008-03-24/200832410444719_1.jpg"];
var z=0;
var timer = null;
function fun(){
    if(z == but.length){z=2;}
    document.getElementById("asd").style.background = "url('"+but[z]+"')";
    z++;
    timer = setTimeout("fun()",2000);
    }
    
</script>
</head>
<body onload="fun()">
<div id="asd"></div>
</body>
</html>